package com.thoughtworks.mail;

import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.assertFalse;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import com.thoughtworks.mail.MailReader;
import com.thoughtworks.utils.InputMasking;

import java.util.List;
import java.io.IOException;

public class MailReaderTest {
    private static final String SERVER_NAME = "bjnotes01/ThoughtWorks";
    private static final String DB_NAME = "mail/hrong.nsf";
    private static final String PASSWORD = "";

//    @Test
//    public void testInitialization(){
//        MailReader mailReader1 = MailReader.getInstance();
//        MailReader mailReader2 = MailReader.getInstance();
//
//        assertNotNull(mailReader1);
//        assertNotNull(mailReader2);
//        assertEquals(mailReader1, mailReader2);
//    }

    public static void main(String[] args) throws Exception{
        InputMasking masking = new InputMasking();
        String password = null;
        password = masking.getPassword("input password: ");

        for(int i=0;i<1;i++){
        MailReaderThread mailReaderThread1 = new MailReaderThread(password);

        Thread thread1 = new Thread(mailReaderThread1);

        thread1.start();
        }  
    }
////        System.out.println(System.getProperty("java.library.path"));
//        MailReader mailReader= MailReader.getInstance();
//
//        InputMasking masking = new InputMasking();
//        String password = null;
//        password = masking.getPassword("input password: ");
//
//        List<Mail> mails = mailReader.getMails(SERVER_NAME, DB_NAME, password);
//
//        for(Mail mail:mails){
//            System.out.println(mail.toString());
//        }
//    }


}
